package cn.kgc;
import java.util.Scanner;
public class Maintext {
    public Pets print() {
        Pets pets=new Pets();
        System.out.println("欢迎你来到宠物店");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入需要领养的宠物的名字:");
        String pName=scanner.next();
        pets.setName(pName);
        System.out.println("请输入需要领养的宠物类型:(1:狗狗,2：企鹅)");
        int type = scanner.nextInt();
        if(type==1){
    pets.setpType("狗狗");
        }else if(type==2){
    pets.setpType("企鹅");
        }
        System.out.println("请选择" +pets.getpType() + "性别(1:Q仔,2:Q妹)");
        int sex = scanner.nextInt();
        String  se="";
        if(sex==1){
            se="Q仔";
        }else if (sex==2){
            se="Q妹";
        }
   pets.setSex(se);
        System.out.println("请选择" + pets.getpType()+ "的健康值(1~100)之间");
        int health = scanner.nextInt();
        pets.setHealth(health);
        return pets;
    }
    public Pets printtest(String Pname,int health){
        Pets pets=new Pets();
        System.out.println("**************");
        pets.setHealth(health);
        pets.setName(Pname);
        return pets;
    }
}
